VPATH	= .



TARGET = OS_X

# point to the inclue directory
SOURCEDIR = include
#FITSDIR = /Users/nicolaasgroeneboom/work/code/libraries/Healpix_2.01/cfitsio

FFTWINCLUDE = fftw/include
INCLUDES =-I/sw/include  -I$(SOURCEDIR)  -I$(FFTWINCLUDE)

LIBDIR =  fftw/lib


# compiler specific flags
CFLAGS =  -O3 -D$(TARGET)

FFLAGS =  $(LIBINCLUDE)  -lfftw3  


PROJECT = zestim

_obj 	=  main.o CVector.o CGraph.o CUtil.o CEstimator.o CMath.o CLikelihood.o

obj = $(patsubst %,$(SOURCEDIR)/%,$(_obj))

CC 	= g++ -m64

default: $(PROJECT)

$(PROJECT):  $(obj) 
	$(CC)  -L$(LIBDIR)  $(INCLUDES) -o $(PROJECT) $(obj) $(FFLAGS)  

%.o: %.cpp
	$(CC) -c -o $@ $^ $(INCLUDES) $(CFLAGS)   

%.o: %.cu
	$(CC) -c -o $@ $^ $(INCLUDES) $(CFLAGS)   


clean:	
	rm *.o include/*.o main


